extends "../yuekegongjue-1/yuekegongjue-1.gd"


func _extInit():
	._extInit()
	lv = 2             #等级的设置
	addSkill("[非召唤]友军彻底阵亡时，获得3金币", "回收")
var p3 = 1
var deathChas = []
func _onCharaDel(cha):
	._onCharaDel(cha)
	if not is_instance_valid(cha) or isDeath:return
	if cha.team == team and not cha.isSumm:
		deathChas.append(cha)
		sys.main.player.plusGold(3)

	elif cha.team != team and not cha.isSumm and sys.rndPer(p3) and cha.camp != "塞壬" and lv > 2:
		print("约克公爵触发回收，获得角色：" + cha.chaName)
		sys.main.player.addCha(sys.main.newChara(cha.id))

func _onBattleEnd():
	._onBattleEnd()
	deathChas.clear()